package com.qclix.inv.pdf;

import com.qclix.inv.Invoice;

import java.io.File;

/**
 * TODO: Some javadoc maybe ?
 */
public interface PDFCreator {
    /**
     * Creates a PDF from an invoice and writes it to the specified file
     * @param invoice the invoice to generate
     * @param output the file to which the PDFized invoice must be written
     * @throws PDFCreationException in case of technical exception
     */
    public void writePDF(Invoice invoice, File output) throws PDFCreationException;

    /**
     * Creates a PDF from an invoice and returns it as a String
     * @param invoice the invoice to generate
     * @return a String containing the PDF.
     * @throws PDFCreationException in case of technical exception
     */
    public byte[] getPDF(Invoice invoice) throws PDFCreationException;
}
